<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

$feedback = $_POST["content"];
$uid = intval($_POST["id"]);
$query = "INSERT INTO feedbacks (feedback_date, feedback_comment, feedback_answered, user_id) VALUES (CURDATE(), '$feedback', 0, $uid)";

$db = new mysqli("localhost", "rmplanne_andrew", "Pi39RQ", "rmplanne_rmplanner");

$success = $db->query($query);
$db->commit();

if ($success)
    echo " Thankyou for submitting your feedback";
else
    echo "Feedback not submitted";
$db->close();
?>
